package ace.module.captcha.api.model.dto;

import io.swagger.v3.oas.annotations.media.Schema;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import jakarta.validation.constraints.*;
import jakarta.annotation.Nullable;
import java.io.Serializable;

/**
* 验证码配置 data transform object.
*
* @author Caspar
*/
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@Schema(title = CaptchaItemConfigDto.TABLE_DESC)
public class CaptchaItemConfigDto implements Serializable {

  public static final String TABLE_NAME = "captcha_item_config";
  public static final String TABLE_DESC = "验证码配置";
  public static final String ID_COLUMN_NAME = "id";
  public static final String ID_TITLE = "id";
  public static final String ID_DESC = "";
  public static final String ENABLE_COLUMN_NAME = "enable";
  public static final String ENABLE_TITLE = "是否启用";
  public static final String ENABLE_DESC = "";
  public static final String ENABLE_SYSTEM_CODE_COLUMN_NAME = "enable_system_code";
  public static final String ENABLE_SYSTEM_CODE_TITLE = "是否启用系统验证";
  public static final String ENABLE_SYSTEM_CODE_DESC = "";
  public static final String SYSTEM_CODE_COLUMN_NAME = "system_code";
  public static final String SYSTEM_CODE_TITLE = "系统验证码";
  public static final String SYSTEM_CODE_DESC = "";
  public static final String ATTEMPT_COUNT_COLUMN_NAME = "attempt_count";
  public static final String ATTEMPT_COUNT_TITLE = "已尝试次数";
  public static final String ATTEMPT_COUNT_DESC = "";
  public static final String EXPIRE_IN_SECONDS_COLUMN_NAME = "expire_in_seconds";
  public static final String EXPIRE_IN_SECONDS_TITLE = "过期时间";
  public static final String EXPIRE_IN_SECONDS_DESC = "单位时间-秒";
  public static final String DELETE_FLAG_COLUMN_NAME = "delete_flag";
  public static final String DELETE_FLAG_TITLE = "删除标识";
  public static final String DELETE_FLAG_DESC = "0-未删除";
  public static final String CREATE_TIME_COLUMN_NAME = "create_time";
  public static final String CREATE_TIME_TITLE = "创建时间";
  public static final String CREATE_TIME_DESC = "单位-毫秒";
  public static final String UPDATE_TIME_COLUMN_NAME = "update_time";
  public static final String UPDATE_TIME_TITLE = "更新时间";
  public static final String UPDATE_TIME_DESC = "单位-毫秒";
  public static final String ROW_VERSION_COLUMN_NAME = "row_version";
  public static final String ROW_VERSION_TITLE = "版本号和乐观锁";
  public static final String ROW_VERSION_DESC = "";

  @Schema(title = ID_TITLE, description = ID_DESC)
  private Long id;

  @Schema(title = ENABLE_TITLE, description = ENABLE_DESC)
  private Boolean enable;

  @Schema(title = ENABLE_SYSTEM_CODE_TITLE, description = ENABLE_SYSTEM_CODE_DESC)
  private Boolean enableSystemCode;

  @Size(max = 255)
  @Schema(title = SYSTEM_CODE_TITLE, description = SYSTEM_CODE_DESC)
  private String systemCode;

  @Schema(title = ATTEMPT_COUNT_TITLE, description = ATTEMPT_COUNT_DESC)
  private Integer attemptCount;

  @Schema(title = EXPIRE_IN_SECONDS_TITLE, description = EXPIRE_IN_SECONDS_DESC)
  private Long expireInSeconds;

  @Schema(title = DELETE_FLAG_TITLE, description = DELETE_FLAG_DESC)
  private Long deleteFlag;

  @Schema(title = CREATE_TIME_TITLE, description = CREATE_TIME_DESC)
  private Long createTime;

  @Schema(title = UPDATE_TIME_TITLE, description = UPDATE_TIME_DESC)
  private Long updateTime;

  @Schema(title = ROW_VERSION_TITLE, description = ROW_VERSION_DESC)
  private Long rowVersion;

}